package com.haochang.chunkvod.controller.adapter.cash;

import java.util.List;

import com.haochang.chunkvod.R;
import com.haochang.chunkvod.app.utils.SaleUtils;
import com.haochang.chunkvod.controller.adapter.base.BaseAdapterHelper;
import com.haochang.chunkvod.controller.adapter.base.QuickAdapter;
import com.haochang.chunkvod.model.cash.BillInfo;

import android.content.Context;

/**
 * 挂单详情适配器
 */
public class ShiftQueryAdapter extends QuickAdapter
{
	private Context mContext;

	public ShiftQueryAdapter(Context context, int layoutResId, List data)
	{
		super(context, layoutResId, data);
		mContext = context;
	}

	@Override
	protected void convert(BaseAdapterHelper helper, final Object item)
	{
		final BillInfo billInfo = (BillInfo) item;
		helper.setText(R.id.tv_bill, billInfo.getBillNum());
		helper.setText(R.id.tv_receivable, SaleUtils.getSaleString(billInfo.getReceivable()));
		helper.setText(R.id.tv_pend, SaleUtils.getSaleString(billInfo.getPend()));
		helper.setText(R.id.tv_received, SaleUtils.getSaleString(billInfo.getReceived()));
	}

}
